<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>

    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>

</head>
<body>
<div id="app">

    <el-button @click="query()">返回主页</el-button>
    <el-button @click="goack()">订单详情</el-button>
</div>

<script type="text/javascript">

    $.get("/cai/pay/queryTestOne",function (backData) {
        if (backData.code=="10000"){
            $.get("/cai/pay/addOrderOne",function (backData) {
                alert("订单成功生成");
            });
        }else {
            alert("提交订单失败");
        }
    });

    var app = new Vue({
        el:"#app",
        data:{

        },
        methods:{
            query:function () {
                window.location.href="/cai/indexTwo.html";
            },
            goack:function () {
                window.location.href="/cai/userOrder.html";
            }
        }
    });
</script>

</body>
</html>
